package com.example.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("成本核算信息")
@TableName("cost")
public class Cost {
    /** 序号ID */
    @ApiModelProperty("ID")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("项目阶段ID")
    private Integer stageId;

    @ApiModelProperty("项目ID")
    private Integer projectId;

    @ApiModelProperty("项目名称")
    private String name;
    @ApiModelProperty("项目团队名称")
    private String teamName;
    @ApiModelProperty("项目费用说明")
    private String description;

    @ApiModelProperty("成本费用")
    private BigDecimal budget;

    @ApiModelProperty("当前使用金额")
    private BigDecimal currentBudget;

    @ApiModelProperty("是否超出预算")
    private String overspend;

    /** 创建时间 */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /** 更新时间 */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /** 乐观锁版本号 */
    @ApiModelProperty("乐观锁版本号")
    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private Integer version;
    /** 是否已经删除 */
    @ApiModelProperty(value = "是否删除；0：未删除；1：已删除")
    private Integer isDeleted;

}
